Skip to content

ref(nuxt): Use addVitePlugin instead of deprecated vite:extendConfig#19464

Merged
s1gr1d merged 5 commits intodevelopfrom
sig/nuxt-vite-config
Mar 2, 2026
Merged

ref(nuxt): Use addVitePlugin instead of deprecated vite:extendConfig#19464
s1gr1d merged 5 commits intodevelopfrom
sig/nuxt-vite-config

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Feb 23, 2026

vite:extendConfig is deprecated, so source maps handling will be done in a plugin which is added with addVitePlugin from Nuxt.

Also updated the existing tests so they can test the new plugin functionality.

Closes #19345

@s1gr1d s1gr1d changed the title ref(nuxt): Use addVitePlugin instead of deprecated vite:extendConfig ref(nuxt): Use addVitePlugin instead of deprecated vite:extendConfig Feb 23, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.63 kB - -
@sentry/browser - with treeshaking flags 24.13 kB - -
@sentry/browser (incl. Tracing) 42.43 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.09 kB - -
@sentry/browser (incl. Tracing, Replay) 81.25 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.87 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 85.94 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.21 kB - -
@sentry/browser (incl. Feedback) 42.44 kB - -
@sentry/browser (incl. sendFeedback) 30.29 kB - -
@sentry/browser (incl. FeedbackAsync) 35.35 kB - -
@sentry/browser (incl. Metrics) 26.8 kB - -
@sentry/browser (incl. Logs) 26.94 kB - -
@sentry/browser (incl. Metrics & Logs) 27.61 kB - -
@sentry/react 27.38 kB - -
@sentry/react (incl. Tracing) 44.77 kB - -
@sentry/vue 30.08 kB - -
@sentry/vue (incl. Tracing) 44.3 kB - -
@sentry/svelte 25.66 kB - -
CDN Bundle 28.17 kB - -
CDN Bundle (incl. Tracing) 43.26 kB - -
CDN Bundle (incl. Logs, Metrics) 29.01 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.1 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.09 kB - -
CDN Bundle (incl. Tracing, Replay) 80.14 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.65 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.53 kB - -
CDN Bundle - uncompressed 82.35 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.07 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.19 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.9 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.85 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.95 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.77 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 260.67 kB - -
@sentry/nextjs (client) 47.18 kB - -
@sentry/sveltekit (client) 42.89 kB - -
@sentry/node-core 52.24 kB +0.02% +9 B 🔺
@sentry/node 174.69 kB +0.01% +4 B 🔺
@sentry/node - without tracing 97.39 kB +0.02% +11 B 🔺
@sentry/aws-serverless 113.19 kB +0.01% +7 B 🔺

View base workflow run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

}) {
const hooks: Record<string, HookCallback[]> = {};
setupSourceMaps({ debug: true }, mockNuxt as unknown as Nuxt, mockAddVitePlugin);
await mockNuxt.triggerHook('modules:done');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: Maybe we can assert the plugin to be null before the done hook is called to make sure it really happens after the hook, wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cannot be null as it runs at the very beginning already. But I'll add tests to verify the correct filesToDeleteAfterUpload is used.

@s1gr1d s1gr1d changed the title ref(nuxt): Use addVitePlugin instead of deprecated vite:extendConfig ref(hono): Use addVitePlugin instead of deprecated vite:extendConfig Mar 2, 2026
@s1gr1d s1gr1d changed the title ref(hono): Use addVitePlugin instead of deprecated vite:extendConfig ref(nuxt): Use addVitePlugin instead of deprecated vite:extendConfig Mar 2, 2026
@s1gr1d s1gr1d requested a review from andreiborza March 2, 2026 12:17
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,590 - 9,045 +6%
GET With Sentry 1,716 18% 1,613 +6%
GET With Sentry (error only) 6,224 65% 6,044 +3%
POST Baseline 1,211 - 1,188 +2%
POST With Sentry 595 49% 561 +6%
POST With Sentry (error only) 1,043 86% 1,036 +1%
MYSQL Baseline 3,279 - 3,190 +3%
MYSQL With Sentry 462 14% 356 +30%
MYSQL With Sentry (error only) 2,695 82% 2,615 +3%

View base workflow run

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@s1gr1d s1gr1d merged commit 61b1f3f into develop Mar 2, 2026
437 of 439 checks passed
@s1gr1d s1gr1d deleted the sig/nuxt-vite-config branch March 2, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Nuxt] Change nuxt.hook usage to Vite config hook

2 participants